package com.woniu.cq.medical.controller;


import com.woniu.cq.medical.common.Result;
import com.woniu.cq.medical.entity.Administrative;
import com.woniu.cq.medical.service.AdministrativeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author Lucas
 * @since 2020-09-05
 */
@RestController
@RequestMapping("/medical/administrative")
public class AdministrativeController {


    @Autowired
    private AdministrativeService administrativeService;

    /**
     * 查询所有的科室
     * @return
     */
    @GetMapping("list")
    public Result selectAdministrativeList(){
        List<Administrative> administratives = administrativeService.queryAdministrativeList();
        return  Result.success(administratives);
    }

}

